<%= title t :obratypes %>

<h1>Obra Types</h1>

<%= link_to "New", :new_obra_type %>

<% form_tag do -%>
  <p>
    Search:
		<%= text_field_tag :search_field %>

		<%= image_tag 'spinner.gif', :id => 'spinner', :style => 'display: none' %>
  </p>
<%end%>

<div id='results'>
  <%= render :partial => 'result', :collection => @obra_types %>
</div>
	
<br>
<%= link_to "Home", :controller => :home %>

<%= observe_field 'search_field',
          :url            => {:action => 'obra_completion'},
          :frequency      => 1,
          :before         => "Element.show('spinner')",
          :complete       => [ visual_effect(:highlight, :results), "Element.hide('spinner')"],
          :update         => :results,
          :with           => 'prefix' %>

